package com.yq.ylmall.vo.product;

import com.baomidou.mybatisplus.annotation.TableField;
import com.yq.ylmall.model.product.Region;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
@ApiModel(description = "地区返回")
public class RegionVo {
    @ApiModelProperty(value = "地区id")
    private Long id;

    @ApiModelProperty(value = "地区编码")
    private String code;

    @ApiModelProperty(value = "上级地区code")
    private Long parentCode;

    @ApiModelProperty(value = "地区名称")
    private String name;

    @ApiModelProperty(value = "地区级别：0-中国、1-省、自治区、直辖市 2-地级市、地区、自治州、盟 3-市辖区、县级市、县")
    private Integer level;

    //下级列表
    @TableField(exist = false)
    private List<Region> children;
}
